package cate.game.pvp.jungle.core;

import cate.game.res.MixRes;
import cate.game.role.RoleSnapshot;
import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;
import org.springframework.data.annotation.Transient;

import java.util.concurrent.locks.ReentrantLock;

@NoteClass("丛林冒险任务")
public class JungleTaskData {
    @NoteField("发起人")
    public RoleSnapshot owner;
    @NoteField("任务开始时间")
    public long startTime;
    @NoteField("任务结束时间")
    public long endTime;
    @NoteField("任务ID")
    public int taskId;
    @NoteField("奖励")
    public MixRes reward;
    @NoteField("当前被抢夺次数")
    public int robbedTimes;
    @NoteField("是否支援")
    public boolean supported;
    @NoteField("支援者")
    public RoleSnapshot supporter;

    @Transient
    @JsonIgnore
    @NoteField("掠夺锁定帧")
    public int robLockTick;
    @Transient
    @JsonIgnore
    @NoteField("任务锁")
    public ReentrantLock lock;

    public JungleTaskData() {
        lock = new ReentrantLock();
    }
}
